﻿using System;
using YunZuan.Models.Attributes;
using YunZuan.Models.Entities;

namespace YunZuan.Models
{
    [Table(TableName = "yz_supplier", PrimaryKey = "SupplierID")]
    public class SupplierInfo : BaseEntity
    {
        #region Private Properties
        private int? _supplierID;
        private int? _userID;
        private int? _spotdata;
        private string _supplierCode;
        private string _supplierName;
        private string _rapnetID;
        private string _userName;
        private string _password;
        private string _skype;
        private string _country; 

        private string _deliveryAddress;
        private string _url;
        private string _supplierShortName;
        private string _introduction;
        private int? _sysStatus;
        private DateTime? _createTime;
        private DateTime? _updateTime;
        private int _sort;
        private string _email;
        private int? _datastate;
        private int? _supplierType;
        private string shipTime; // 周一，周二多日期格式
        #endregion

        #region Public Properties
        /// <summary>
        /// SupplierID.
        /// </summary>
        [Column(IsAutoIncrement = true)]
        public int? SupplierID
        {
            get
            {
                return _supplierID;
            }
            set
            {
                this.ChangeNotify<int?>("SupplierID", value, ref _supplierID);
            }
        }
        /// <summary>
        /// UserID
        /// </summary>
        public int? UserID
        {
            get
            {
                return _userID;
            }
            set
            {
                this.ChangeNotify<int?>("UserID", value, ref _userID);
            }
        }
         
        public int? Spotdata
        {
            get
            {
                return _spotdata;
            }
            set
            {
                this.ChangeNotify<int?>("Spotdata", value, ref _spotdata);
            }
        }

        /// <summary>
        /// SupplierCode.
        /// </summary>
        public string SupplierCode
        {
            get
            {
                return _supplierCode;
            }
            set
            {
                this.ChangeNotify<string>("SupplierCode", value, ref _supplierCode);
            }
        }
        /// <summary>
        /// SupplierCode.
        /// </summary>
        public string SupplierShortName
        {
            get
            {
                return _supplierShortName;
            }
            set
            {
                this.ChangeNotify<string>("SupplierShortName", value, ref _supplierShortName);
            }
        } 
        /// <summary>
        /// SupplierName.
        /// </summary>
        public string SupplierName
        {
            get
            {
                return _supplierName;
            }
            set
            {
                this.ChangeNotify<string>("SupplierName", value, ref _supplierName);
            }
        }

        /// <summary>
        /// RapnetID.
        /// </summary>
        public string RapnetID
        {
            get
            {
                return _rapnetID;
            }
            set
            {
                this.ChangeNotify<string>("RapnetID", value, ref _rapnetID);
            }
        } 
        public string UserName
        {
            get
            {
                return _userName;
            }
            set
            {
                this.ChangeNotify<string>("UserName", value, ref _userName);
            }
        } 
        public string Password
        {
            get
            {
                return _password;
            }
            set
            {
                this.ChangeNotify<string>("Password", value, ref _password);
            }
        } 
        public string Skype
        {
            get
            {
                return _skype;
            }
            set
            {
                this.ChangeNotify<string>("Skype", value, ref _skype);
            }
        }

        /// <summary>
        /// Country.
        /// </summary>
        public string Country
        {
            get
            {
                return _country;
            }
            set
            {
                this.ChangeNotify<string>("Country", value, ref _country);
            }
        }
        private decimal? _rebate;
        /// <summary>
        /// Rebate.
        /// </summary>
        public decimal? Rebate
        {
            get { return _rebate; }
            set { this.ChangeNotify<decimal?>("Rebate", value, ref _rebate); }
        }
        private decimal? _fancyrebate;
        /// <summary>
        /// FancyRebate.
        /// </summary>
        public decimal? FancyRebate
        {
            get { return _fancyrebate; }
            set { this.ChangeNotify<decimal?>("FancyRebate", value, ref _fancyrebate); }
        }
        private decimal? _parcelrebate;
        //统包销售折扣
        public decimal? ParcelRebate
        {
            get { return _parcelrebate; }
            set { this.ChangeNotify<decimal?>("ParcelRebate", value, ref _parcelrebate); }
        }
        private decimal? _ringrebate;
        //成品销售折扣
        public decimal? RingRebate
        {
            get { return _ringrebate; }
            set { this.ChangeNotify<decimal?>("RingRebate", value, ref _ringrebate); }
        }
        private decimal? _gemrebate;
        //彩宝销售折扣
        public decimal? GemRebate
        {
            get { return _gemrebate; }
            set { this.ChangeNotify<decimal?>("GemRebate", value, ref _gemrebate); }
        }
        private decimal? _emeraldrebate;
        //彩宝销售折扣
        public decimal? EmeraldRebate
        {
            get { return _emeraldrebate; }
            set { this.ChangeNotify<decimal?>("EmeraldRebate", value, ref _emeraldrebate); }
        }
        private decimal? _primegoldrebate;
        public decimal? PrimeGoldRebate
        {
            get { return _primegoldrebate; }
            set { this.ChangeNotify<decimal?>("PrimeGoldRebate", value, ref _primegoldrebate); }
        } 
        private decimal? _inlaysettingsrebate;
        //空托销售折扣
        public decimal? InlaySettingsRebate
        {
            get { return _inlaysettingsrebate; }
            set { this.ChangeNotify<decimal?>("InlaySettingsRebate", value, ref _inlaysettingsrebate); }
        }
        /// <summary>
        /// DeliveryAddress.
        /// </summary>
        public string DeliveryAddress
        {
            get
            {
                return _deliveryAddress;
            }
            set
            {
                this.ChangeNotify<string>("DeliveryAddress", value, ref _deliveryAddress);
            }
        }

        /// <summary>
        /// Url.
        /// </summary>
        public string Url
        {
            get
            {
                //if (!_url.ToLower().Contains("http"))
                //    _url = "http://" + _url;
                if (!string.IsNullOrEmpty(_url))
                    return _url.TrimEnd('/');
                else return _url;
            }
            set
            {
                this.ChangeNotify<string>("Url", value, ref _url);
            }
        }

        /// <summary>
        /// Introduction.
        /// </summary>
        public string Introduction
        {
            get
            {
                return _introduction;
            }
            set
            {
                this.ChangeNotify<string>("Introduction", value, ref _introduction);
            }
        }

        /// <summary>
        /// SysStatus.
        /// </summary>
        public int? SysStatus
        {
            get
            {
                return _sysStatus;
            }
            set
            {
                this.ChangeNotify<int?>("SysStatus", value, ref _sysStatus);
            }
        }

        /// <summary>
        /// Sort
        /// </summary>
        public int Sort
        {
            get
            {
                return _sort;
            }
            set
            {
                this.ChangeNotify<int>("Sort", value, ref _sort);
            }
        }

        /// <summary>
        /// Email
        /// </summary>
        public string Email
        {
            get
            {
                return _email;
            }
            set
            {
                this.ChangeNotify<string>("Email", value, ref _email);
            }
        }
        /// <summary>
        /// CreateTime.
        /// </summary>
        public DateTime? CreateTime
        {
            get
            {
                return _createTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("CreateTime", value, ref _createTime);
            }
        }

        /// <summary>
        /// UpdateTime
        /// </summary>
        public DateTime? UpdateTime
        {
            get
            {
                return _updateTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("UpdateTime", value, ref _updateTime);
            }
        }

        /// <summary>
        /// 数据状态
        /// </summary>
        public int? Datastate
        {
            get
            {
                return _datastate;
            }
            set
            {
                this.ChangeNotify<int?>("Datastate", value, ref _datastate);
            }
        }
        /// <summary>
        /// 供应商类别
        /// </summary>
        public int? SupplierType
        {
            get
            {
                return _supplierType;
            }
            set
            {
                this.ChangeNotify<int?>("SupplierType", value, ref _supplierType);
            }
        }

        /// <summary>
        /// SupplierCode.
        /// </summary>
        public string ShipTime
        {
            get
            {
                return shipTime;
            }
            set
            {
                this.ChangeNotify<string>("ShipTime", value, ref shipTime);
            }
        }
        private int? supplierRoleID;
        public int? SupplierRoleID
        {

            get
            {
                return supplierRoleID;
            }
            set
            {
                this.ChangeNotify<int?>("SupplierRoleID", value, ref supplierRoleID);
            }
        }
        #endregion

        private string _is_stock;
        /// <summary>
        ///是否现货 0否，1是
        /// </summary>
        public string is_stock
        {
            get { return _is_stock; }
            set { this.ChangeNotify<string>("is_stock", value, ref _is_stock); }
        }
    }
}